﻿using Services.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SQLite;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Services.DAL
{
   public class UserTokenService
    {
        public static UserTokenEntity GetToken(string uid)
        {
            string sql = "select * from UserToken where UID=@UID";
            SQLiteParameter[] para = new SQLiteParameter[] {
                new SQLiteParameter ("@UID",uid)
            };
            DataTable dt = SQLiteHelper.ExecuteTable(sql, para);
            return ModelConvertHelper.ToEntity<UserTokenEntity>(dt);
        }
    }
}
